// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

import { game } from "../../../../script/game/control/game";
import { recordType } from "../../../../script/game/model/playerEvent";
import { ListItem } from "../../../../script/util/ListView/ListItem";

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends ListItem<recordType> {
    

    @property(cc.Label)
    time: cc.Label = null;

    @property(cc.Label)
    desc: cc.Label = null;

    start () {
        this.node.on('on_scroll_view', (msg) => {
            this.node.opacity = msg;
          });
    }
    initItem(data: recordType, index: number) {
        if(!data) {return};
        this.time.string = data.time;
        this.desc.string = data.desc;
    }
    onItemclick(data: recordType) {
        
    }
    // update (dt) {}
}
